home *** CD-ROM | disk | FTP | other *** search
-
-
-
- MMMMEEEEDDDDIIIIAAAAVVVVIIIIEEEEWWWWEEEERRRR((((3333)))) MMMMEEEEDDDDIIIIAAAAVVVVIIIIEEEEWWWWEEEERRRR((((3333))))
-
-
-
- NNNNAAAAMMMMEEEE
- MediaViewer - a ViewKit class for viewing media files and data
-
- IIIINNNNHHHHEEEERRRRIIIITTTTSSSS FFFFRRRROOOOMMMM
- VkComponent
-
- HHHHEEEEAAAADDDDEEEERRRR FFFFIIIILLLLEEEE
- #include <MediaViewer/MediaViewer.h>
-
- LLLLIIIIBBBBRRRRAAAARRRRYYYY
- /usr/lib/libMediaViewer.so
-
- PPPPUUUUBBBBLLLLIIIICCCC PPPPRRRROOOOTTTTOOOOCCCCOOOOLLLL SSSSUUUUMMMMMMMMAAAARRRRYYYY
- CCCCoooonnnnssssttttrrrruuuuccccttttoooorrrr aaaannnndddd DDDDeeeessssttttrrrruuuuccccttttoooorrrr
- MediaViewer(const char *name, Widget parent);
-
- virtual ~MediaViewer();
-
- static VkComponent *CreateMediaViewer(const char *name,
- Widget parent);
-
-
- VVVViiiieeeewwww FFFFuuuunnnnccccttttiiiioooonnnnssss
- virtual void viewFile(const char *filename);
-
- virtual void viewData(const char *name, Atom type,
- void *data, unsigned long length);
-
- virtual void viewData(const char *name, const char *type,
- void *data, unsigned long length);
-
-
- AAAAcccccccceeeessssssss FFFFuuuunnnnccccttttiiiioooonnnnssss
- virtual const char *getFtrTypeName();
-
- virtual const char *getFtrDescription();
-
- virtual const char *getTargetName();
-
-
- CCCCLLLLAAAASSSSSSSS DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- The _M_e_d_i_a_V_i_e_w_e_r class is a simple ViewKit (see VVVViiiieeeewwwwKKKKiiiitttt((((3333))))) application
- programming interface to the _M_e_d_i_a_W_a_r_e_h_o_u_s_e media viewer framework.
-
- MediaViewer allows ViewKit-based applications to view media data within
- the applications' user interface. By default, MediaViewer supports
- viewers for a variety of media types, including image, audio, movie, 3D
- models, text, and HTML.
-
- The viewers are dynamically loaded DSOs (see DDDDSSSSOOOO((((5555))))) so end users may add
- new viewers or change the configuration of the existing viewers. For
- more information on these customizations, see the ``Adding New Data Types
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- MMMMEEEEDDDDIIIIAAAAVVVVIIIIEEEEWWWWEEEERRRR((((3333)))) MMMMEEEEDDDDIIIIAAAAVVVVIIIIEEEEWWWWEEEERRRR((((3333))))
-
-
-
- and Viewers'' section later in this man page.
-
-
- FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNN DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- MediaViewer(const char *name, Widget parent);
-
- The constructor initializes the MediaViewer framework. _n_a_m_e is used
- by the VkComponent base class. The widget parent identifies the
- MediaViewer's position in the application's widget hierarchy. The
- application may, if necessary, set constraints on the MediaViewer's
- ViewKit base widget.
-
-
- static VkComponent *CreateMediaViewer(const char *name, Widget parent);
-
- _C_r_e_a_t_e_M_e_d_i_a_V_i_e_w_e_r() is a convenience function that constructs a
- MediaViewer object and returns a pointer to the VkComponent base
- class. Applications may free this object via the virtual
- destructor.
-
-
- virtual void viewFile(const char *filename);
-
- The _v_i_e_w_F_i_l_e() method displays the contents of the specified file in
- the viewer. _v_i_e_w_F_i_l_e() uses the Indigo Magic file typing rules (see
- ffffttttrrrr((((1111))))) to determine which viewer to use.
-
-
- virtual void viewData(const char *name, Atom type,
- void *data, unsigned long length);
-
- virtual void viewData(const char *name, const char *type,
- void *data, unsigned long length);
-
- The _v_i_e_w_D_a_t_a() methods allow applications to specify data in-line
- (i.e., not in a file). The _n_a_m_e is passed to the viewer, which will
- usually use it as a title. The _t_y_p_e, which may be specified as
- either an atom or as a string, is the X Inter-Client Communication
- Conventions Manual (ICCCM) target type for this piece of data. The
- _d_a_t_a itself is specified by a pointer and a _l_e_n_g_t_h in bytes.
-
- Note that many of the default viewers do not support in-line data.
-
-
- virtual const char *getFtrTypeName();
-
- After a file is viewed with _v_i_e_w_F_i_l_e(), _g_e_t_F_t_r_T_y_p_e_N_a_m_e() returns the
- FTR name for the file.
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-
-
-
- MMMMEEEEDDDDIIIIAAAAVVVVIIIIEEEEWWWWEEEERRRR((((3333)))) MMMMEEEEDDDDIIIIAAAAVVVVIIIIEEEEWWWWEEEERRRR((((3333))))
-
-
-
- virtual const char *getFtrDescription();
-
- After a file is viewed with _v_i_e_w_F_i_l_e(), _g_e_t_F_t_r_T_y_p_e_N_a_m_e() returns the
- FTR description for the file.
-
-
- virtual const char *getTargetName();
-
- After a file is viewed with _v_i_e_w_F_i_l_e(), _g_e_t_F_t_r_T_y_p_e_N_a_m_e() returns the
- ICCCM target name for the file's data.
-
-
- IIIINNNNHHHHEEEERRRRIIIITTTTEEEEDDDD MMMMEEEEMMMMBBBBEEEERRRR FFFFUUUUNNNNCCCCTTTTIIIIOOOONNNNSSSS
- IIIInnnnhhhheeeerrrriiiitttteeeedddd ffffrrrroooommmm VVVVkkkkCCCCoooommmmppppoooonnnneeeennnntttt
- show(), hide(), name(), className(), baseWidget(),
- installDestroyHandler(), removeDestroyHandler(), widgetDestroyed(),
- setDefaultResources(), getResources(), okToQuit(), _name, _baseWidget,
- _w, deleteCallback
-
-
- LLLLIIIINNNNKKKKIIIINNNNGGGG WWWWIIIITTTTHHHH MMMMEEEEDDDDIIIIAAAAVVVVIIIIEEEEWWWWEEEERRRR
- MediaViewer requires the MediaViewer library as well as the ViewKit,
- Motif, and X libraries. A typical compile command is:
-
- CC -o sample sample.c++ -lMediaViewer -lvk -lvkhelp -lSgm -lXm -lXt -lX11
-
-
- AAAADDDDDDDDIIIINNNNGGGG NNNNEEEEWWWW DDDDAAAATTTTAAAA TTTTYYYYPPPPEEEESSSS AAAANNNNDDDD VVVVIIIIEEEEWWWWEEEERRRRSSSS
- By default, MediaViewer provides viewers for popular image, audio, movie,
- 3D, and text data formats. You may add additional viewers, if you wish.
-
- The viewers are configured via the /_u_s_r/_l_i_b/_m_e_d_i_a_w/_m_e_d_i_a_w_r_c file. The
- file maps FTR names and ICCCM target types with viewer DSOs. If you wish
- to add a viewer for a new data type, specify the viewer in this format:
-
- _t_a_r_g_e_t__t_y_p_e.viewer: _v_i_e_w_e_r__D_S_O__n_a_m_e
-
- _F_T_R__n_a_m_e.targetType: _t_a_r_g_e_t__t_y_p_e
-
- The first line maps the target type to the DSO. The second line maps FTR
- names to target names for data that is read from files.
-
-
- _F_T_R__n_a_m_e is the FTR (see FFFFTTTTRRRR((((1111)))))name. _t_a_r_g_e_t__t_y_p_e is the target type.
- _v_i_e_w_e_r__D_S_O__n_a_m_e is the name of the DSO (see DDDDSSSSOOOO((((5555))))) containing the viewer
- procedures.
-
-
- The DSO should provide these functions:
-
-
-
-
-
-
- PPPPaaaaggggeeee 3333
-
-
-
-
-
-
- MMMMEEEEDDDDIIIIAAAAVVVVIIIIEEEEWWWWEEEERRRR((((3333)))) MMMMEEEEDDDDIIIIAAAAVVVVIIIIEEEEWWWWEEEERRRR((((3333))))
-
-
-
- extern "C" {
- void *create(Widget);
- void view(void* handle,
- Atom type, void* data, unsigned long length);
- void hide(void* handle);
- void destroy(void* handle);
- };
-
- The _c_r_e_a_t_e function should create the viewer using the specified widget
- as its parent and return a handle to the viewer. The handle is passed as
- the first argument to the other three functions.
-
- The _v_i_e_w function should map and view the data. It is called with an X
- atom representing the ICCCM target type, a pointer to the data, and the
- length of the data. The data may be a file name, for file-based target
- types.
-
- The _h_i_d_e and _d_e_s_t_r_o_y functions are optional. If provided, they will be
- called when the viewer is unmapped and destroyed, respectively.
-
-
- FFFFIIIILLLLEEEESSSS
- /usr/lib/mediaw/mediawrc - MediaWarehouse viewer framework configuration
- file
-
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- ftr(1), ViewKit(3), VkComponent(3), DSO(5), _I_n_t_e_r-_C_l_i_e_n_t _C_o_m_m_u_n_i_c_a_t_i_o_n
- _C_o_n_v_e_n_t_i_o_n_s _M_a_n_u_a_l
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 4444
-
-
-
-